/******************************************************************
 * Created by: Goh Chee Hong                                       
 * Date of Creation: 31/Jul/2008
 * Date of last modification: 
 *                                                                
 * Description: Used for the user to key in their password to retrieve the private key
 ******************************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Pbdms.Forms.Tools
{
    public partial class FrmPassword :Form
    {
        public FrmPassword()
        {
            InitializeComponent();
            Pbdms.Common.Global.paintBackGround(this);
        }

        public string password;

        public void setKeyId(string id)
        {
            lblID.Text = id;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (txtpassword.Text.Equals("") || txtpassword.Text == null)
            {
                MessageBox.Show("Please enter a password");
            }
            else
            {
                this.DialogResult = DialogResult.OK;
                this.password = txtpassword.Text;
                this.Close();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Ignore;
            this.Close();
        }
    }
}